package shop.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
@TableName("`order`")
public class Order {
    private String id;
    @TableField("user_id")
    private String userId;
    @TableField("total_quantity")
    private Integer totalQuantity;
    @TableField("total_price")
    private BigDecimal totalPrice;

    @TableField("address")
    private String address;

    /**
     * 0=已下单；1=已发货
     */
    @TableField("status")
    private Integer status;

    @TableField(exist = false)
    private User user;


    @TableField(exist = false)
    private List<OrderItem> orderItemList;
}
